package com.ebelter.btcomlib.models.bluetooth.products.ear_temperature.bean;

import com.ebelter.btcomlib.models.db.AppDatabase;
import com.ebelter.btcomlib.utils.TimeUtils;
import com.raizlabs.android.dbflow.annotation.Column;
import com.raizlabs.android.dbflow.annotation.PrimaryKey;
import com.raizlabs.android.dbflow.annotation.Table;
import com.raizlabs.android.dbflow.structure.BaseModel;

/**
 * Created by pan on 2018/7/25
 */

@Table(database = AppDatabase.class)
public class EarTemMesureResult extends BaseModel{

    public static final String TAG = "EarTemMesureResult";
    @PrimaryKey(autoincrement = true)//ID自增
    public long id;

    /*** 测试时间，int类型，用于排序 ***/
    @Column
    public long measureTime;

    @Column
    public String authKey;

    @Column
    public String measureTimeStr;

    /*** 编号 **/
    @Column
    public int number;
    /*** 温度 ***/
    @Column
    public float temperature;

    public EarTemMesureResult(long measureTime, int number, float temperature) {
        this.measureTime = measureTime;
        this.number = number;
        this.temperature = temperature;
        this.measureTimeStr = TimeUtils.formatTime1(measureTime);
    }

    public EarTemMesureResult() {
    }


    @Override
    public String toString() {
        return "EarTemMesureResult{" +
                "id=" + id +
                ", measureTime=" + measureTime +
                ", authKey='" + authKey + '\'' +
                ", measureTimeStr='" + measureTimeStr + '\'' +
                ", number=" + number +
                ", temperature=" + temperature +
                '}';
    }
}
